home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 62
/
Volume 62 - JOGO DISK .iso
/
Games
/
my-shop-dress-up.swf
/
scripts
/
frame_103
/
DoAction.as
Wrap
Text File
|
2008-03-17
|
2KB
|
100 lines
function setSelected(side, clip, frame)
{
_root[clip + side].gotoAndStop(frame);
switch(clip)
{
case "top":
_root["chardata" + side][0] = frame;
break;
case "bottom":
_root["chardata" + side][1] = frame;
break;
case "purse":
_root["chardata" + side][2] = frame;
break;
case "shoe":
_root["chardata" + side][3] = frame;
}
}
stop();
head1.swapDepths(10);
head2.swapDepths(20);
h1x = head1._x;
h1y = head1._y;
h2x = head2._x;
h2y = head2._y;
chardata1 = ["top","bottom","purse","shoe"];
chardata2 = ["top","bottom","purse","shoe"];
if(selectedChar1 == 1)
{
body2.gotoAndStop(2);
arm2.gotoAndStop(2);
attachMovie("head" + selectedChar1,"head2",20);
head2._x = h2x;
head2._y = h2y;
body1.gotoAndStop(1);
arm1.gotoAndStop(1);
attachMovie("head" + selectedChar2,"head1",10);
head1._x = h1x;
head1._y = h1y;
}
else if(selectedChar2 == 1)
{
body2.gotoAndStop(2);
arm2.gotoAndStop(2);
attachMovie("head" + selectedChar2,"head2",20);
head2._x = h2x;
head2._y = h2y;
body1.gotoAndStop(1);
arm1.gotoAndStop(1);
attachMovie("head" + selectedChar1,"head1",10);
head1._x = h1x;
head1._y = h1y;
}
else
{
body2.gotoAndStop(1);
arm2.gotoAndStop(1);
attachMovie("head" + selectedChar2,"head2",20);
head2._x = h2x;
head2._y = h2y;
head2._xscale = -100;
body1.gotoAndStop(1);
arm1.gotoAndStop(1);
attachMovie("head" + selectedChar1,"head1",10);
head1._x = h1x;
head1._y = h1y;
}
btn_top1.onPress = function()
{
_root.setSelected(1,"top",this._currentframe + 1);
};
btn_bottom1.onPress = function()
{
_root.setSelected(1,"bottom",this._currentframe + 1);
};
btn_shoe1.onPress = function()
{
_root.setSelected(1,"shoe",this._currentframe + 1);
};
btn_purse1.onPress = function()
{
_root.setSelected(1,"purse",this._currentframe + 1);
};
btn_top2.onPress = function()
{
_root.setSelected(2,"top",this._currentframe + 1);
};
btn_bottom2.onPress = function()
{
_root.setSelected(2,"bottom",this._currentframe + 1);
};
btn_purse2.onPress = function()
{
_root.setSelected(2,"purse",this._currentframe + 1);
};
btn_shoe2.onPress = function()
{
_root.setSelected(2,"shoe",this._currentframe + 1);
};